package com.mypage.adapter;

import com.cloudcc.mobile.R;
import com.mypage.bean.NewTaskBean;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class NewTaskAdapter extends BaseAdapter {
	public Context context;
	public NewTaskBean mDatabean;
    public NewTaskAdapter(Context ctx,NewTaskBean bean){
    	this.context=ctx;
    	this.mDatabean=bean;
    }
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return mDatabean.data.size();
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		// TODO Auto-generated method stub
		View view = View.inflate(context, R.layout.new_state_list_item, null);
		TextView textState = (TextView) view.findViewById(R.id.textState);
		String s = mDatabean.data.get(position).codevalue;
		textState.setText(s);
		return view;
	}

}
